/* 
 *   Date       Developer   Description
 *   
 *
 *   Classname:  example.utils.LogUtils
 * 
 *   Date:   2014-3-4
 * 
 *   The source code contained in this listing is proprietary to
 *   HLJ POST YITONG INFO-NET CO.,LTD.
 * 
 *   Unauthorized copying, adaptation, distribution, use, or display
 *   is strictly prohibited.
 *   This software is Copyright 2014 HLJ POST YITONG INFO-NET CO.,LTD.
 */
package com.titan.demo.camel.utils;

/**
 *
 *
 * @author Administrator
 *
 */
public class LogUtils {
    private static String message(String clazz, String method, String... msg) {
        StringBuffer buf = new StringBuffer(128);
        buf.append("在执行类[").append(clazz).append("]");
        buf.append("的方法[").append(method).append("]");
        buf.append("时，信息为：");
        
        for (int i = 0; i < msg.length; i++) {
            buf.append("[").append(msg[i]).append("]");
        }
        return buf.toString();
    }
    
    
    public static void log(String clazz, String method, String... msg) {
        String info = message(clazz, method, msg);
        System.out.println(info);
    }
    public static void log(Class clazz, String method, String... msg) {
        if(clazz==null) {
            log("", method, msg);
//        } else if(clazz.equals(StreamEndpoint.class)) {
//        } else if(clazz.equals(CustomComponent.class)) {
//        } else if(clazz.equals(CustomEndpoint.class)) {
//        } else if(clazz.equals(CustomConsumer.class)) {
//        } else if(clazz.equals(CustomProducer.class)) {
        } else {
            log(clazz.getSimpleName(), method, msg);
        }
    }    
}

